/**
 * Common module
 */

  var tool = require("../../../util/tool");
  var consts = require("../../../util/consts");
  var Common = {
      componentWillMount: function (){
          this.widget = $.extend(true, {}, this.props.widget);
      },
      // 优化刷新
      shouldComponentUpdate: function (nextProps, nextState){
          var current = this.widget, next = nextProps.widget;
          if (current && next){
              this.widget = $.extend(true, {}, next);
              return !(tool.isObjectEqual(current, next));
          }
          return false;
      }
  };


  module.exports = Common;
